package com.xmy.cultivate.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 调查题目
 * </p>
 *
 * @author hpiggy
 * @since 2024-06-13
 */
@Data
@TableName("survey_topic")
@ApiModel(value = "SurveyTopic对象", description = "调查题目")
public class SurveyTopic implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.NONE)
    private Long id;

    private Integer yearPart;

    private Integer quarterNum;

    private String name;

    @ApiModelProperty("1正常，0关闭")
    private Integer status;

    @ApiModelProperty("1：课程满意度调查")
    private Integer type;

    @ApiModelProperty("1：单选，2：多选")
    private Integer topicType;

    @ApiModelProperty("添加时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;

    @ApiModelProperty("是否删除，0正常，1删除")
    @TableLogic(value = "0", delval = "1")
    @TableField(select = false)
    private Integer deleted;

    @ApiModelProperty("选项集合")
    @TableField(exist = false)
    List<SurveyTopicOptions> surveyTopicOptionsList;

    @ApiModelProperty("已选择的选项id")
    @TableField(exist = false)
    private Long selected;

}
